What you do is make small groups of firing positions in the areas where you want the encounter to follow the player to. Each of these groups is then set to a unique firing position group letter, e.g. the first group of firing positions set to 'A', the group nearby set to 'B', the group near 'B' set to 'C', etc. You can make up to 26 of these groups per encounter, since you have letters A-Z to work with. It's best to have the groups linearly arranged from the direction of A to Z where possible, so that it's easier to remember which is which.
Then, you make what I call "empty squads" for each letter: each of these squads has no actor type specified, as well as no spawn points, move positions, or spawn settings. All that is specified in these squads is the initial state, return state, and "automatic migration", which HAS to be checked. Automatic migration gives the encounter's actors the freedom to switch from one squad to another at will. This is what lets them follow the player, since now they can move (migrate) to the firing position group's squad that is closest to the player.
Finally, the most important part is to specify the corresponding firing position group letter for each empty squad for each AI state (attacking, attacking guard, defending, etc.) You should name the squads by which firing position group they belong to, e.g. "squad_a" for the A group.
After you finish this, don't forget to create a normal squad or squads to actually spawn your actors in. In these squads, "automatic migration" has to be checked as well, and the firing position group letters should be set ONLY to the firing position group closest to the squad's spawn points.
Once all of this is done, you're ready to simply script in (ai_follow_target_players <ai>) and that's it. It should work.
So, basically, AI following is actually just automatic migrations to the squad that the player is closest to.
And finally, here are all of the AI following commands:

(ai_follow_target_disable <ai>)
turns off following for an encounter

(ai_follow_target_players <ai>)
sets the follow target for an encounter to be the closest player

(ai_follow_target_unit <ai> <unit>)
sets the follow target for an encounter to be a specific unit

(ai_follow_target_ai <ai> <ai>)
sets the follow target for an encounter to be a group of AI (encounter, squad or platoon)

(ai_follow_distance <ai> <real>)
sets the distance threshold which will cause squads to migrate when following someone

